package com.own.component.store.core.property;

import lombok.Data;

import java.io.Serializable;

/**
 * LocalStoreProperty
 *
 * @author chenxueli
 * @date 2023-07-10 17:05:00
 */
@Data
public class LocalStoreProperty implements Serializable {

    /**
     * 默认过期时间ms（要求大于10000ms）
     */
    private long delay = 1200000L;

    /**
     * 是否需要定时清理
     */
    private boolean prune = true;

    public long getDelay() {
        if (delay < 10000) {
            return 10000;
        }
        return delay;
    }

}
